package myJs.tool

import org.scalajs.dom.{HTMLInputElement, document}
import org.scalajs.dom.window.localStorage

import scala.scalajs.js

/** Created by yz on 15/9/2023
  */
trait ProjectTool {

  def fileLeast(inputName: String)(f: Int => Boolean) =  {
    val inputElem = document.getElementsByName(inputName).asInstanceOf[HTMLInputElement]
    println(inputElem.outerHTML)
    val size = inputElem.files.length
    f(size)
  }

}
